<style>
    .dialog-sp {
        background-color: #1ab394;
    }

    .dialog-group-sp {
        float: left;
    }
</style>

<div class="row" ms-controller="Test">
    <!--标题-->
    <div class="col-md-12">

        <div class="row">
            <button class="pull-right btn btn-info" data-toggle="modal" data-target="#myModal">随机生成</button>
            <!-- 模态框（Modal） -->
            <div class="modal fade dialog" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                 aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h3 class="modal-title" id="myModalLabel" style="text-align: center">随机生成</h3>
                        </div>
                        <div class="modal-body">
                            <div class="input-group input-group-sm">
                                <span class="input-group-addon dialog-sp">试卷模板</span>
                                <select class="form-control" :click="testSamplefn" style="min-width: 170px"
                                        :duplex="@randSample">
                                    <option ms-for="(k,v) in @testSample">{{v.SJName}}</option>
                                </select>
                            </div>
                            <br>
                            <div class="input-group input-group-sm">
                                <span class="input-group-addon dialog-sp">试卷数量</span>
                                <input class="form-control" style="min-width: 170px" :duplex="@sjnum">
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button type="button" class="btn btn-primary" data-dismiss="modal" :click="createExamRadfn">生成试卷</button>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal -->
                </div>
            </div>
            <!--<button class="pull-right btn btn-info" data-toggle="modal" data-target="#myModa2">自定义生成</button>-->
            <!-- 模态框（Modal） -->
            <div class="modal fade dialog" id="myModa2" tabindex="-1" role="dialog" aria-labelledby="myModalLabe2"
                 aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h3 class="modal-title" id="myModalLabe2" style="text-align: center">自定义生成</h3>
                        </div>
                        <div class="modal-body">
                            <div class="input-group input-group-sm">
                                <span class="input-group-addon dialog-sp">层次</span>
                                <select class="form-control" :click="layerfn" style="min-width: 170px"
                                       :duplex="@creatlayer" >
                                    <option ms-for="(k,v) in @layer">{{v.Name}}</option>
                                </select>
                                <span class="input-group-addon dialog-sp">专业</span>
                                <select class="form-control" :click="majorfn" style="min-width: 170px"
                                        :duplex="@creatmajor">
                                    <option ms-for="(k,v) in @major">{{v.ZName}}</option>
                                </select>
                            </div>
                            <br>
                            <div class="input-group input-group-sm">
                                <!--<span class="input-group-addon dialog-sp">层次</span>-->
                                <!--<select class="form-control" :click="waysallfn" style="min-width: 170px"-->
                                <!--:duplex="@addKSSubject">-->
                                <!--<option ms-for="(k,v) in @subjct">{{v.Name}}</option>-->
                                <!--</select>-->
                                <span class="input-group-addon dialog-sp">难度</span>
                                <select class="form-control" :click="difficultyfn" style="min-width: 170px"
                                        :duplex="@creatlevel">
                                    <option ms-for="(k,v) in @difficulty">{{v.Level}}</option>
                                </select>
                                    <span class="input-group-addon dialog-sp">题型</span>
                                    <select class="form-control" :click="titleTypefn" style="min-width: 170px"
                                            :duplex="@creattype"  >
                                        <option ms-for="(k,v) in @titleType">{{v.Name}}</option>
                                    </select>
                            </div>
                            <br>
                            <div class="input-group input-group-sm">
                                <span class="input-group-addon dialog-sp">科目</span>
                                <select class="form-control" :click="subjctfn" style="min-width: 170px"
                                        :duplex="@creatsubject" >
                                    <option ms-for="(k,v) in @subjct">{{v.Name}}</option>
                                </select>
                                <!--<span class="input-group-addon dialog-sp">-->

                                <!--</span>-->
                                <!--<select class="form-control" :click="majorfn" style="min-width: 170px"-->
                                        <!--:duplex="@creatmajor">-->
                                    <!--<option ms-for="(k,v) in @major">{{v.ZName}}</option>-->
                                <!--</select>-->
                            </div>
                            <button class="pull-right btn btn-info" :click="creatquestionfn">查询</button>
                            <br>
                            <div>
                                <div style="width: 45%;height: 300px;display: inline;border: 1px solid;float: left;overflow: scroll">
                                    <span>题目列表</span>
                                    <table class="table table-responsive table-bordered" id="questionTable">
                                        <thead style="word-break: keep-all;white-space: nowrap">
                                        <tr>
                                            <td>#</td>
                                            <td>题目</td>
                                            <td>操作</td>
                                        </tr>
                                        </thead>
                                        <tbody :for="(k,v) in @creatquestion" >
                                        <tr style="height: 15px;overflow: hidden" >
                                            <td >{{k+1}}</td>
                                            <td>>{{v.Title}}</td>
                                            <td>
                                                <button class="btn btn-sm btn-link" onclick="editQuestion(this)">添加</button>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <!--<div style="width: 15%;height: 300px;display: inline;border: 1px solid;float: left">-->
                                   <!--<div style="margin: auto">-->
                                       <!--<button class="btn btn-default navbar-btn" style="background-color: #1ab394">添加</button>-->
                                       <!--<br>-->
                                        <!--<button class="btn btn-default navbar-btn" style="background-color: #1ab394">移除</button>-->
                                   <!--</div>-->
                                <!--</div>-->
                                <div style="width: 40%;height: 300px;display: inline;border: 1px solid;float: left;overflow: scroll">
                                    <span>选中题目</span>
                                    <table class="table table-responsive table-bordered" id="checkQuTable">
                                        <thead style="word-break: keep-all;white-space: nowrap">
                                        <tr>
                                            <!--<td>#</td>-->
                                            <td>题目</td>
                                            <td>操作</td>
                                        </tr>
                                        </thead>
                                        <tbody  >
                                        <tr>
                                            <td></td>
                                            <td>
                                                <button class="btn btn-sm btn-link" onclick="editQuestion(this)">移除</button>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                                <div class="input-group input-group-sm">
                                    <span class="input-group-addon dialog-sp">分数</span>
                                    <input class="form-control"  style="min-width: 170px;border: 1px solid;">

                            </div>
                </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button type="button" class="btn btn-primary" data-dismiss="modal">生成试卷</button>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal -->
                </div>
            </div>
            <div class="search_head col-md-8" style="margin-top: 10px">
               <span style=" font-size: 15px;margin-left: 20px">层次 </span><input type="text" class="form-control" style=" display: inline-block;width: 150px;" >
                <span style=" font-size: 15px;margin-left: 20px">科目</span><select class="form-control" style=" display: inline-block;width: 150px;"><option></option></select>
                <span style=" font-size: 15px;margin-left: 20px">专业</span><select class="form-control" style=" display: inline-block;width: 150px;"><option></option></select>
              <span style=" font-size: 15px;">试卷模板 </span><input type="text" class="form-control" style=" display: inline-block;width: 150px;">
                <button type="button" class="btn btn-default navbar-btn" style="margin-left: 20px"
                        :click="@waysallfn">查询
                </button>
            </div>


            <!-- 列表-->
            <br>

            <table class="table table-responsive table-bordered" style="margin: 50px 0;text-align: center;"
                   id="createTable">
                <thead style="word-break: keep-all;white-space: nowrap">
                <tr>
                    <!--<td><input type="checkbox">&nbsp;全选</td>-->
                    <td style="display: none">RID</td>
                    <td style="min-width: 40px;text-align: right">#</td>
                    <td>试卷名称</td>
                    <td>单选题数量</td>
                    <td>多选题数量</td>
                    <td>判断题数量</td>
                    <!--<td>填空题（分数）</td>-->
                    <!--<td>大题（分数）</td>-->
                    <!--<td>主观题（分数）</td>-->
                    <td>总分</td>
                    <td style="min-width: 145px;">操作</td>
                </tr>
                </thead>
                <tbody>
                <tr ms-for="(k,v) in @waysall" class="ola-pointer">
                    <td style="display: none">2</td>
                    <td style="text-align: right">
                        {{k+1}}
                    </td>
                    <td>
                        <input type="checkbox" style="display: none;">&nbsp;&nbsp;{{v.Name}}
                    </td>
                    <td>{{v.DXnumber}}</td>
                    <td>{{v.DDXnumber}}</td>
                    <!--<td onclick="Translayer(v.CID)">Translayer({{v.CID}})</td>-->
                    <td>{{v.DTnumber}}</td>
                    <td>{{v.Score}}</td>
                    <!--<td>{{v.KID}}</td>-->
                    <!--<td>{{v.SID}}</td>-->
                    <td>
                        <button class="btn btn-sm btn-link">编辑</button>
                        <!--<button class="btn btn-sm btn-link">修改</button>-->
                        <button class="btn btn-sm btn-link">删除</button>
                    </td>
                </tr>
                </tbody>
                <tfoot>
                <tr>
                    <td style="display: none;">
                        <input type="checkbox">全选
                    </td>
                    <td colspan="80">
                        <div class="row">
                            <button class="btn btn-sm btn-link" style="float: right;margin-right: 10%"> 批量删除</button>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="80">
                        <div class="row">
                            <div class="col-md-5">
                                <span>第&nbsp;</span><span>{{@Search.P}}</span><span>&nbsp;页</span>&nbsp;&nbsp;
                                <span>共&nbsp;</span><span>{{@Search.TP}}</span><span>&nbsp;页</span>
                            </div>
                            <div class="col-md-5">
                                <ul class="pagination" style="margin: 0 0 0 0;">
                                    <li :if="@waysall.P>1"><a :click="@waysall.P--">&laquo;</a></li>
                                    <li :for="v in @Search.Pages" :click="@Search.P=v"><a
                                            :class="[(@Search.P==v?'selected':'')]">{{v}}</a></li>
                                    <li :if="@Search.P<@Search.TP"><a :click="@Search.P++">&raquo;</a></li>
                                </ul>
                            </div>
                        </div>
                    </td>
                </tr>
                </tfoot>
            </table>


            <!-- 分页-->
            <div style="margin-bottom: 120px;">
            </div>
            <div :if="@html.length>0" class="layui-layer-shade" id="layui-layer-shade" times="1"
                 style="z-index:19891014; background-color:#000; opacity:0.3; filter:alpha(opacity=30);"></div>
            <div :if="@html.length>0" class="layui-layer layui-layer-page layui-layer-demo layer-anim-02"
                 type="page" times="1" showtime="0" contype="string"
                 style="z-index: 19891015; width: 80%; height: 80%; top: 87.5px; left: 144px;">
                <div id="" class="layui-layer-content" style="height: 698px;" ms-html="@html">
                </div>
                <span class="layui-layer-setwin"><a class="layui-layer-ico layui-layer-close layui-layer-close2"
                                                    href="javascript:;" :click-1="@html=''" :click-2="@Type='List'">

        </a></span><span class="layui-layer-resize"></span>
            </div>
        </div>

    </div>
